/*
 *    BackUPManagerServer
 *    About: Software for managing BackUPs of files and MySQL databases with a centralized master server configurable using an intuitive Web interface
 *    Owner: Kevin Guanche Darias, owner level rights reserved
 *    Code contributors:
 *     - Kevin Guanche Darias
 *    SVN: https://code.google.com/p/backup-manager-server/
 *    License: GNU GPL v3 all rights reserved
 */
#define SERVER_MASTERS_MANAGER
#include <iostream>
#include <string>
#include <fstream>
#include <sstream>
#include <time.h>
#ifdef WIN32 // If we are using Windows
#include <windows.h>
#define bzero ZeroMemory
#define sleep(a) Sleep(a * 1000)
#define usleep Sleep
#endif
using namespace std;
#include "includes/time.functions.h"
#include "includes/time.functions.cpp"
#ifdef WIN32
#include "includes/serviceglobals.h"
#include "includes/service.h"
#include "includes/service.cpp"
#endif
#include "includes/socketservice.class.h"
#include "includes/socketservice.class.cpp"
int main(int32_t argc,char **argv){
    SERVICE_TABLE_ENTRY ServiceTable[] =  {
        {SERVICE_NAME, (LPSERVICE_MAIN_FUNCTION) serviceMain},
        {NULL, NULL}
    };
    if (StartServiceCtrlDispatcher (ServiceTable) == FALSE){
        return GetLastError ();
    }
    return 0;
}
